Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default gpu_mem for boards with >=1GB RAM #131

Closed
wants to merge 2 commits into from
Closed

Fix default gpu_mem for boards with >=1GB RAM #131

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 1, 2020

Fixes #122

@ghost
Copy link
Author

ghost commented Sep 1, 2020

Also works correctly if the user uses total_mem to bring total available memory down below 1024. (Which is how I tested it).

@ghost
Copy link
Author

ghost commented Sep 1, 2020

Hmm, OK. After some further experimentation with total_mem on a Pi 4B, it seems the firmware actually does this:

  • for total_mem <= 1008MB, gpu_mem defaults to 64MB
  • for total_mem > 1008MB gpu_mem defaults to 76MB

I've fixed up the PR to match this behaviour.

(Also confirmed with latest firmware on Pi 3B).

@XECDesign
Copy link
Member

Maybe using vcgencmd get_mem gpu instead would help avoid this kind of thing in the future altogether?

@ghost ghost closed this Sep 4, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default gpu_mem is now 76MB, not 64MB
2 participants